﻿$(function() {
    $.getclientdata();
});

var clientdataItem = [];
var clientorganizeData = [];
var clientdepartmentData = [];
var clientpostData = [];
var clientroleData = [];
var clientuserGroup = [];
var clientuserData = [];

/**
 * 菜单数据
 */
var authorizeMenuData = [];
var authorizeButtonData = [];
var authorizeColumnData = [];

$.getclientdata = function () {
    $.ajax({
        url: contentPath + "Home/GetClientData",
        type: "GET",
        dataType: "json",
        async: false,
        success: function (data) {
            //clientdataItem = data.dataItem;
            //clientorganizeData = data.organize;
            //clientdepartmentData = data.department;
            //clientpostData = data.post;
            //clientroleData = data.role;
            //clientuserGroup = data.userGroup;

            /**
             * 当前用户基础数据
             */
            clientuserData = data.user;

            /**
             * 当前用户菜单
             */
            authorizeMenuData = data.authorizeMenu;

            //authorizeButtonData = data.authorizeButton;
            //authorizeColumnData = data.authorizeColumn;
            //clientModuleData = data.menuData;
            //clientModuleButtonData = data.buttonData;
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            dialogMsg(errorThrown, -1);
        }
    });
}